package edu.bbu.commonproject.desktop.gui.view.swing.file;

import java.awt.GridLayout;
import java.awt.Image;

import javax.swing.ImageIcon;

import edu.bbu.commonproject.desktop.gui.view.swing.file.lister.LocalFileListPanel;
import edu.bbu.commonproject.desktop.gui.view.swing.file.lister.ServerFileListPanel;
import edu.bbu.commonproject.desktop.gui.view.swing.utils.Design;
import edu.bbu.commonproject.desktop.gui.view.swing.utils.TexturedPanel;

/**
 *The center file list panel.
 */
public class CenterFileListPanel extends TexturedPanel
{
	/** The image base texture. */
	private Image baseTexture;
	
	/** The local list panel. */
	private LocalFileListPanel localFileListPanel;
	
	/** The server file list panel. */
	private ServerFileListPanel serverFileListPanel;
	
	/**
	 * The constructor.
	 */
	public CenterFileListPanel()
	{
		baseTexture = Design.COMPONENT_BASETEXTURE;
		this.setTexture(baseTexture);
		this.setLayout(new GridLayout(1, 2));
		
		setComponents();
	}
	
	/**
	 * It sets up the components.
	 */
	private void setComponents()
	{
		localFileListPanel = new LocalFileListPanel();
		serverFileListPanel = new ServerFileListPanel();
		
		this.add(localFileListPanel);
		this.add(serverFileListPanel);
	}
	
	/**
	 * It gets the local file list panel.
	 * @return the file list panel.
	 */
	public LocalFileListPanel getLocalFileListPanel()
	{
		return localFileListPanel;
	}
	
	/**
	 * Gets the server file list panel.
	 * @return the server file list panel.
	 */
	public ServerFileListPanel getServerFileListPanel()
	{
		return serverFileListPanel;
	}
}
